﻿@model IEnumerable<OnlinePharmacyV001.Models.FeedBack>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<p>Display by Author Name:
 @using (Html.BeginForm())
{
     @Html.TextBox("strSearch");   
<input type="submit" value="Populate" />
}
</p>
<table>
    <tr>
        <th>
            Id
        </th>
        <th>
            Content
        </th>
        <th>
            AuthorName
        </th>
       
        <th>
            PostedDate
        </th>
        <th>
            Status
        </th>
        <th>
        Action</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.fbId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.fbContent)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.fbAuthorName)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.fbPostedDate)
        </td>
        <td>
             @if (Html.DisplayFor(modelItem => item.fbStatus).ToHtmlString()=="1")
      {
          @("Read");
      }     else{
          @("Un-Read");
      }
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new {  id=item.fbId }) |
            @Html.ActionLink("Details", "Details", new { id=item.fbId }) |
            @Html.ActionLink("Delete", "Delete", new {  id=item.fbId })
        </td>
    </tr>
}

</table>
